<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "etc_send_creator_detail".
 *
 * @property int $id
 * @property string|null $email 邮箱
 * @property string|null $list_uid 发送日期
 * @property int|null $status 0未处理，1已绑定，-1绑定失败
 * @property int|null $log_id etc_send_creator_day_log.id
 * @property int|null $username 创作者账号
 */
class EtcSendCreatorDetail extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'etc_send_creator_detail';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['status', 'log_id'], 'integer'],
            [['email','username'], 'string', 'max' => 255],
            [['list_uid'], 'string', 'max' => 100],
            [['list_uid', 'email'], 'unique', 'targetAttribute' => ['list_uid', 'email']],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'email' => Yii::t('app', '邮箱'),
            'list_uid' => Yii::t('app', '发送日期'),
            'status' => Yii::t('app', '0未处理，1已绑定，-1绑定失败'),
            'log_id' => Yii::t('app', 'etc_send_creator_day_log.id'),
        ];
    }
}
